Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: VM and container accounting via /proc/pid rather than cgroups #17055

Closed
shodanshok opened this issue Feb 24, 2024 · 3 comments
Closed
Labels

Comments

@shodanshok
Copy link

Problem

When using ZFS, cgroups do not correctly account for written data (and, possibly, prefetched read data). Give a look here:

screenshot

This could be fixed by using normal /proc/pid stats rather than cgroups for gathering these info.

Description

Use classical /proc/pid stats for VM and container statistics.

Importance

really want

Value proposition

  1. not depending of cgroups for accounting data is going to help with ZFS

Proposed implementation

No response

@shodanshok shodanshok added feature request New features needs triage Issues which need to be manually labelled labels Feb 24, 2024
@ilyam8
Copy link
Member

ilyam8 commented Jun 2, 2024

Hey, @shodanshok. Do you have DefaultIOAccounting=yes in /etc/systemd/system.conf? This fixed the problem for me on my Proxmox servers with ZFS.

After enabling IO accounting:

sudo systemctl daemon-reexec

@ilyam8
Copy link
Member

ilyam8 commented Jun 2, 2024

I think this request is wontfix because it will not work for qemu VMs.

@ilyam8 ilyam8 added wontfix and removed needs triage Issues which need to be manually labelled labels Jun 2, 2024
@ilyam8 ilyam8 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2024
@shodanshok
Copy link
Author

Hey, @shodanshok. Do you have DefaultIOAccounting=yes in /etc/systemd/system.conf? This fixed the problem for me on my Proxmox servers with ZFS.

@ilyam8 yes, I tried DefaultIOAccounting=yes (and systemctl daemon-reexec + reboot) but nothing changed on my Rocky Linux 9.4. Any idea?

Accounting via /proc/[pid] should work for qemu VMs: while IO is done a dedicated threads, the counters under /proc/[pid]/ioseem to account for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants